﻿using System.Threading.RateLimiting;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using TMS_BackEnd.Models.SH;

namespace TMS_BackEnd.Configers
{
    public class sys_roleConfigers : IEntityTypeConfiguration<sys_role>
    {
        public void Configure(EntityTypeBuilder<sys_role> builder)
        {
            builder.ToTable(nameof(sys_roleConfigers));
            builder.HasKey(e => e.role_id);
            builder.Property(e => e.role_name).HasMaxLength(30).IsRequired();
            builder.Property(e=>e.role_key).HasMaxLength(100).IsRequired();
            builder.Property(e => e.data_scope).HasColumnType("char").HasMaxLength(1);
            builder.Property(e => e.status).HasColumnType("Char").HasMaxLength(1).IsRequired();
        }
    }
}
